package game;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.geom.Point2D;

public class HudTiro extends Hud
{
	private static final long serialVersionUID = 1L;
	Font font = new Font("Arial", Font.BOLD, 20);
	public HudTiro(int index, Point2D position, Point2D size) 
	{
		super(index,
				new Point2D.Double(Game.screenWidth - 99, Game.screenHeigth - 45),
				size,
				new Rectangle(Game.screenWidth - 99, Game.screenHeigth - 99, Game.screenWidth, Game.screenHeigth));
	}
	
	public void update(Player player)
	{
		super.updateMovimentoHudTiro(player);
	}
	
	public void draw(Graphics g, Player player)
	{
		g.drawImage(super.getImage(),
				(int)this.getPosition().getX(),
				(int)this.getPosition().getY(),
				null);
		
		g.setFont(font);
		g.setColor(Color.WHITE);
		String str = ""+(int)player.getQuantTiro();
		if(str.length() == 1)
		{
			str = "0" + str;
		}
		g.drawString(str, (int)this.getPosition().getX() + 63, (int)this.getPosition().getY() + 30);
		
		//System.out.println(this.getPosition());
	}
	

	
	
	
}
